<script setup>

import useApplyDetailStore from "@/store/modules/applyDetail.js";
import DataFormZCRK from "./DataFormZCRK.vue";
import DataFormZCPF from "./DataFormZCPF.vue";
import DataFormZCJC from "./DataFormZCJC.vue";

const applyDetailStore = useApplyDetailStore();

const props = defineProps({
  detailInfo: {
    type: Object,
  }
})

const formCompMapping = {
  "ZCRK": DataFormZCRK,
  "ZCPF": DataFormZCPF,
  "ZCJC": DataFormZCJC
}

const formComp = computed(()=> {
  return formCompMapping[applyDetailStore.getApplyType()]
})

const applyData = computed(()=> {
  return applyDetailStore.getDetailData();
});

</script>

<template>
  <el-form label-width="100">

    <component :is="formComp"></component>

    <el-form label-width="100">
      <el-row>
        <el-col :span="24">
          <el-form-item label="备注" prop="remark">
            <el-input disabled type="textarea" v-model="applyData.remark" placeholder="请输入" />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>

  </el-form>

</template>

<style scoped lang="scss">

</style>